package com.rabbit.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.rabbit.base.TabFragment;
import com.rabbit.base.TagsFragment;

/**
 * MainFragment
 * @author zhilei.liu
 * 2014-12-9下午8:40:52
 */
public class MainFragment extends TagsFragment{


    public final static String TAG_INFO = "Info";

    public final static String TAG_LOCAL = "Local";

    public final static String TAG_WALLET = "Wallet";
    
    private TabFragment mLocalFragment;

    private TabFragment mWalletFragment;

    private TabFragment mInfoFragment;
    
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View root = super.onCreateView(inflater, container, savedInstanceState);
        initTagFragment(inflater);
        return root;
    }

    private void initTagFragment(LayoutInflater inflater) {
        mInfoFragment = new InfoFragment();
        mLocalFragment = new LocalFragment();
        mWalletFragment = new WalletFragment();
        addTabFragment(mLocalFragment, getActivity(), TAG_LOCAL, inflater);
        addTabFragment(mWalletFragment, getActivity(), TAG_WALLET, inflater);
        addTabFragment(mInfoFragment, getActivity(), TAG_INFO, inflater);
        initPreSelectTabFragment(TAG_LOCAL);
        selectTabFragment(TAG_LOCAL);
      }
    
    
}
